<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/commercial.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateOffreCommercialeTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form>
                <h:panelGrid columns="6">
                    <h:outputLabel value="#{bundle.CreateOffreCommercialeLabel_nomOffre}" for="nomOffre" />
                    <p:inputText id="nomOffre" required="true" value="#{offreCommercialeController.selected.nomOffre}" title="#{bundle.CreateOffreCommercialeTitle_nomOffre}" />
                    <p:message for="nomOffre"/>
                    <h:outputLabel value="#{bundle.CreateOffreCommercialeLabel_tiers}" for="tiers" />
                    <p:selectOneMenu id="tiers" value="#{offreCommercialeController.selected.tiers}" title="#{bundle.CreateOffreCommercialeTitle_tiers}" >
                        <f:selectItems value="#{tiersController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="tiers"/>
                    <h:outputLabel value="#{bundle.CreateOffreCommercialeLabel_etatOffre}" for="etatOffre" />
                    <p:selectOneMenu id="etatOffre" value="#{offreCommercialeController.selected.etatOffre}" title="#{bundle.CreateOffreCommercialeTitle_etatOffre}" >
                        <f:selectItems value="#{etatOffreController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="etatOffre"/>
                    <h:outputLabel value="#{bundle.CreateOffreCommercialeLabel_categorieOffre}" for="categorieOffre" />
                    <p:selectOneMenu id="categorieOffre" value="#{offreCommercialeController.selected.categorieOffre}" title="#{bundle.CreateOffreCommercialeTitle_categorieOffre}" >
                        <f:selectItems value="#{categorieOffreController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="categorieOffre"/>
                    <h:outputLabel value="#{bundle.CreateOffreCommercialeLabel_dateCreation}" for="dateCreation" />
                    <p:calendar id="dateCreation" value="#{offreCommercialeController.selected.dateCreation}" title="#{bundle.CreateOffreCommercialeTitle_dateCreation}" pattern="dd/MM/yyyy">
                        <f:convertDateTime pattern="dd/MM/yyyy" />
                    </p:calendar>
                    <p:message for="dateCreation"/>
                    <h:outputLabel value="#{bundle.CreateOffreCommercialeLabel_dateCloture}" for="dateCloture" />
                    <p:calendar id="dateCloture" value="#{offreCommercialeController.selected.dateCloture}" title="#{bundle.CreateOffreCommercialeTitle_dateCloture}" pattern="dd/MM/yyyy">
                        <f:convertDateTime pattern="dd/MM/yyyy" />
                    </p:calendar>
                    <p:message for="dateCloture"/>
                    <h:outputLabel value="#{bundle.CreateOffreCommercialeLabel_receptionOk}" for="receptionOk" />
                    <p:selectBooleanCheckbox id="receptionOk" value="#{offreCommercialeController.selected.receptionOk}" title="#{bundle.CreateOffreCommercialeTitle_receptionOk}" />
                    <p:message for="receptionOk"/>
                    <h:outputLabel value="#{bundle.CreateOffreCommercialeLabel_dateReceptionOk}" for="dateReceptionOk" />
                    <p:calendar id="dateReceptionOk" value="#{offreCommercialeController.selected.dateReceptionOk}" title="#{bundle.CreateOffreCommercialeTitle_dateReceptionOk}" pattern="dd/MM/yyyy">
                        <f:convertDateTime pattern="dd/MM/yyyy" />
                    </p:calendar>
                    <p:message for="dateReceptionOk"/>
                    <h:outputLabel value="#{bundle.CreateOffreCommercialeLabel_factureOk}" for="factureOk" />
                    <p:selectBooleanCheckbox id="factureOk" value="#{offreCommercialeController.selected.factureOk}" title="#{bundle.CreateOffreCommercialeTitle_factureOk}" />
                    <p:message for="factureOk"/>
                    <h:outputLabel value="#{bundle.CreateOffreCommercialeLabel_facture}" for="facture" />
                    <p:selectOneMenu id="facture" value="#{offreCommercialeController.selected.facture}" title="#{bundle.CreateOffreCommercialeTitle_facture}" >
                        <f:selectItems value="#{factureController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="facture"/>
                    <h:outputLabel value="#{bundle.CreateOffreCommercialeLabel_groupeOffre}" for="groupeOffre" />
                    <p:selectOneMenu id="groupeOffre" value="#{offreCommercialeController.selected.groupeOffre}" title="#{bundle.CreateOffreCommercialeTitle_groupeOffre}" >
                        <f:selectItems value="#{groupeOffreController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="groupeOffre"/>
                    <h:outputLabel value="#{bundle.CreateOffreCommercialeLabel_documents}" for="documents" />
                    <p:selectOneMenu id="documents" value="#{offreCommercialeController.selected.documents}" title="#{bundle.CreateOffreCommercialeTitle_documents}" >
                        <f:selectItems value="#{documentsController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="documents"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{offreCommercialeController.create}" value="#{bundle.CreateOffreCommercialeSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{offreCommercialeController.prepareList}" value="#{bundle.CreateOffreCommercialeShowAllLink}" immediate="true"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
